1. Field
Apparatuses and methods consistent with exemplary embodiments relate to rendering geometric shapes, and more particularly, to rendering one or more geometric shapes by using information such as texture information, vertex information, and uniformity information.
2. Description of the Related Art
A graphic rendering engine such as a rasterization engine performs rendering of geometric shapes for generating two-dimensional (2D) images to be displayed on a computer monitor, a television screen, or other display devices. An image may denote a 2D screen or a three-dimensional (3D) screen depending on an application. For example, in a computer game application, a 2D representation of a 3D screen may be obtained by rendering polygons of a wire frame model. A rendering engine may be used in a 2D application for rendering text, icons, images, or other elements in a 2D user interface.
An appearance of a geometric shape such as a polygon in a rendered image may be controlled by texture information that defines a texture that is to be applied to the geometric shape while performing the rendering operation. If there are a plurality of shapes on a screen, a bottleneck phenomenon may occur when an engine binds the textures separately to each of the shapes, and accordingly, variations in rendering states may occur. To address the above phenomenon, a plurality of small textures may be packaged with one large texture, which may be referred to as a texture atlas. Since it is faster to bind one large texture to each of the shapes than to bind a large number of small textures, using the texture atlas may achieve improvement in rendering performance. When it is needed to package textures of different sizes to a texture atlas, a program tries to arrange textures in an efficient way in order to reduce an overall size of the texture atlas as much as possible.